<!DOCTYPE html>

<html>
    <head>
<meta charset="utf-8">
<title>无标题文档</title>
        <script src="../style/js/jquery.js"></script>
        <script src="../style/js/bt.dwz.js"></script>
</head>



<body style="zoom: 1;" layerchildren="children">
    <!--layerchildren:BODY这里必须填为layerget，用于返回值；-->
<div class="form-inline bs-docs-example">
    <strong><label>请在关闭该层之前留个标记：</label></strong>
    <input type="text" layerchildren="layerget" name="title" id="name">
    <!--layerchildren:这里必须填为layerget，用于返回值；name:json的name值,value:input中可不用填写value-->
</div>
<p>a.html，您可以通过父窗口得到我的DOM(点击右上角关闭按钮试试)，从而操作我的一切。我也可以这里操作父窗口。</p>
    <div class="widget-content nopadding">
			<div role="grid" class="dataTables_wrapper" ><div class=""></div>
                <table class="table table-bordered data-table dataTable" id="table1">
					<thead>
						<tr role="row">
                            <th act="name">姓名</th>
                            <th act="age">年龄</th>
                            <th act="sex">性别</th>
                            <th act="job">职业</th>
                        </tr>
					</thead>			
				<tbody>
                    <tr class="gradeA odd">
						<td class="  sorting_1" layerchildren="layerget" name="name" value="Gecko">Gecko</td>
						<td class=" " layerchildren="layerget" name="age" value="Firefox 1.0">Firefox 1.0</td>
						<td class=" " layerchildren="layerget" name="sex" value="Win 98+ / OSX.2+">Win 98+ / OSX.2+</td>
						<td class="center " layerchildren="layerget" name="job" value="1.7">1.7</td>
					</tr><tr class="gradeA even">
						<td class="  sorting_1" layerchildren="layerget" name="name" value="Gecko">Gecko</td>
						<td class=" " layerchildren="layerget" name="age" value="Firefox 1.5">Firefox 1.5</td>
						<td class=" ">Win 98+ / OSX.2+</td>
						<td class="center ">1.8</td>
                    <!--layerchildren:这里必须填为layerget，用于返回值；name:json的name值,value:非input元素中必须填写value,否则获取的内容为该元素内的html-->
					</tr><tr class="gradeA odd">
						<td class="  sorting_1">Gecko</td>
						<td class=" ">Firefox 2.0</td>
						<td class=" ">Win 98+ / OSX.2+</td>
						<td class="center ">1.8</td>
					</tr><tr class="gradeA even">
						<td class="  sorting_1">Gecko</td>
						<td class=" ">Firefox 3.0</td>
						<td class=" ">Win 2k+ / OSX.3+</td>
						<td class="center ">1.9</td>
					</tr>
                    
                </tbody>
                </table>
                <div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix">
                    <div class="dataTables_filter">
                        <!--<label>Search: <input type="text"></label>-->
                        <label>分页: <select name="page">
                            <option value="20">20</option>
                            <option value="50">50</option>
                            <option value="100">100</option></select>
                        </label>
                    </div>
                    <div class="dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_full_numbers" >
                        <a class="first ui-corner-tl ui-corner-bl fg-button ui-button ui-state-default ui-state-disabled" >第一页</a>
                        <a class="previous fg-button ui-button ui-state-default ui-state-disabled">上一页</a>
                        <span>
                            <a class="fg-button ui-button ui-state-default ui-state-disabled">1</a>
                            <a class="fg-button ui-button ui-state-default" >2</a>
                            <a class="fg-button ui-button ui-state-default">3</a>
                            <a class="fg-button ui-button ui-state-default" >4</a>
                            <a class="fg-button ui-button ui-state-default" >5</a>
                        </span>
                        <a class="next fg-button ui-button ui-state-default"  >下一页</a>
                        <a class="last ui-corner-tr ui-corner-br fg-button ui-button ui-state-default" >最后一页</a>
                    </div>
                </div></div>  
		</div>
<button class="btn" id="add" layer="iframeAuto">点击让层自适应iframe</button>
<!--layer:iframeAuto可以用于自适应大小-->
<button class="btn" id="new" layer="layer" options="{type: 2,shade: [0],fix: false,title: ['iframe子父操作', true],iframe: { src: 'b.html' },area: ['500px', '260px'],offset: ['150px', '']}">基于当层再弹出一个</button>
<!--现插件只支持弹层于父层之中移动-->
<button class="btn" id="a" layerchildren="close" close="a13(data)">点击关闭iframe</button>
<!--layerchildren:该层的关闭按钮， close:回调函数,参数data为获取的json返回值,例如:a13(data)是在该父页面定义的函数-->

<script>
    function aa(json) {
        for (var i = 0; i < json.length; i++) {
            if (json[i].name == "title") {
                $("#name").val(json[i].value);
                return false;
            }
        }
    }

</script>
</body>
</html>